package com.example.onlinemusic.mapper;

import com.example.onlinemusic.model.LoveMusic;
import com.example.onlinemusic.model.Music;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface LoveMusicMapper {
    //查询是否收藏过音乐
    Music findLoveMusic(int userId, int musicId);
    //将未收藏的音乐收藏
    int insertLoveMusic(int userId,int musicId);
    //取消收藏
    int deleteLoveMusic(int userId,int musicId);
    //查询全部收藏的音乐
    List<LoveMusic> findLoveMusicByUID(int userId);
    //根据关键词查询收藏的音乐(模糊查询)
    List<LoveMusic> findLoveMusicByUIDAndName(String title, int userId);

}
